<!DOCTYPE html>
<html>
    <head>
        <title>1</title>
        <script type="text/javascript" src="../js/vue.js"></script>
    </head>
    <body>
       <div id="root">
            <h1></h1>
        </div>
        <script type="text/javascript">
            let number = 88
            let person ={name:'张三',sex:'男'}
            //age默认不可被枚举，遍历的；默认不可修改
            Object.defineProperty(person,'age',{
                // value:18,
                // enumerable:true,//可遍历 默认false
                // writable:true,  //可修改 默认false
                // configurable: true ,//可删除 默认false
                get(){
                    //绑定效果，可以动态去取number
                    console.log('读取了啊啊啊')
                    return number
                },
                set(value){
                    //类似监听修改
                    console.log('modify----'+value)
                    number=value
                }
            })
            console.log(Object.keys(person))
            console.log(person)
            for(let key in person){
                console.log('@',person[key])
            }
        </script>
    </body>
</html>
